<div class="division" style=" padding:3px; margin:0;">
<table>
<tr>
  <th align="right"><{t}>类型名称:<{/t}></th>
  <td><input type="text" class="_x_ipt" vtype="required" name="gtype[name]" value="<{$gtype.name|escape:html}>">*</td>
</tr>
<tr>
  <th align="right"><{t}>类型别名:<{/t}></th>
  <td><input type="gtype[text]" value="<{$gtype.alias|escape:html}>" name="gtype[alias]" size="40"/><br /><{t}>（以"|"分隔，以"|"开头与结尾，如：“|T恤|T恤衫|”）<{/t}></td>
</tr>
<{if $brands}>
<tr>
  <th align="right"><{t}>关联品牌:<{/t}></th>

  <td class="select-brand">
    <div class="content-head"><input type="checkbox" id="checkAll" <{if $select_all}>checked='checked'<{/if}> name="checkAll" class="x-input " autocomplete="off">全选</label></div><br/>
    <{foreach from=$brands item=item key=key}>
        <input type="checkbox" name="gtype[brand][<{$key}>][brand_id]" value="<{$item.brand_id}>" <{if $gtype.brand[$item.brand_id]}>checked='checked'<{/if}> /><{$item.brand_name}>
    <{/foreach}>
  </td>
</tr>
<{/if}>
</table>
</div>
<script>
if($('checkAll')){
  $('checkAll').addEvent('click',function(){
    $ES('input[type=checkbox]').set('checked',this.checked==true?true:false);
  });
  }
</script>